package day07HomeWork;/*
Student、Teacher、Doctor类和Test类
Person类：name、age、address、Person(参)、eat()、sleep()，sayHi()
Student类：继承Person、className、stuId，Student(参)、study()，重写sayHi()方法
Teacher类：继承Person、salary，Teacher(参)、teach()，重写sayHi()方法
Doctor类：继承Person、title，Doctor(参)、cut()
Test：创建对象、调用方法测试*/

public class PersonTest {
    public static void main(String[] args) {
        Student ww = new Student("王伟",24,"陕西","jsd2507","1120");
        ww.sayHi();
        ww.sleep();
        ww.eat();
        System.out.println("------");

        Teacher jj = new Teacher("张三",54,"山西",50000);
        jj.sayHi();
        jj.eat();
        jj.sleep();
        System.out.println("------");

        Doctor ii = new Doctor("李四",45,"背景","脑科主任");
        ii.sayHi();
        ii.sleep();
        ii.eat();
    }
}
